package weiyao.xinxidasai.service;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.multipart.MultipartFile;
import weiyao.xinxidasai.pojo.FFiles;
import weiyao.xinxidasai.service.impl.UploadServiceImpl;
import weiyao.xinxidasai.service.model.ChunkEncryptionResult;

import java.io.IOException;

@Service
public interface UploadService {


    // ============== 普通文件上传 ==============
    @Transactional
    void processAndSaveFile(MultipartFile file, Long folderId, Long versionId, String encryptionType) throws Exception;








    // 分片上传后的文件处理
    @Transactional
    void processAndSaveFileFromDisk(String filePath, String fileName,
                                    Long folderId, Long versionId, String md5, String encryptionType);

    // 检查文件是否已存在
    FFiles selectFileByMd5(String md5);


}
